package org.mspring.mlog.dao.impl;

import org.mspring.mlog.dao.StatDao;
import org.mspring.mlog.entity.Stat;
import org.mspring.platform.dao.hibernate.GenericDao;
import org.springframework.stereotype.Repository;

/**
 * @author Gao Youbo
 * @since 2014年3月9日
 */
@Repository
public class StatDaoImpl extends GenericDao<Stat, Long> implements StatDao {

    @Override
    public Stat findByType(String type) {
        return uniqueResult("select s from Stat s where s.type = ? order by id desc", type);
    }
}
